@extends('base')

@section('content')
<div class="col-lg-12"">
    <h1 class="page-header">View Customers</h1>
</div>


<!-- will be used to show any messages -->
@if (Session::has('message'))
<div class="col-lg-12 alert alert-info">{{ Session::get('message') }}</div>
@endif
<div class="col-sm-12" style="padding-bottom: 10px">
    <a class="btn btn-primary" href="{{ url('customers/create') }}"><i class="fa fa-plus"></i> Add Customer</a>
</div>

<div class="panel-body">
    <div class="table-responsive">
        <table class="table table-striped table-bordered table-hover" id="customers">
            <thead>
            <tr>
                <th>ID</th>
                <th>Name</th>
                <th>Billing Address</th>
                <th>Shipping Address</th>
                <th>Contact</th>
                <th>Credit Card</th>
                <th>Operations</th>
            </tr>
            </thead>
        </table>

    </div>
@stop

@section('script')
<script src="/mar/js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="/mar/js/plugins/dataTables/dataTables.bootstrap.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $("#customers").dataTable( {
            "bProcessing": true,
            "bServerSide": true,
            "sAjaxSource": "customers/datatable"
        } );
    } );
</script>

@stop